<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Link URL Expressions</title>
</head>
<body>
<!-- 
Absolute URLs: http://www.thymeleaf.org
Relative URLs, which can be:
Page-relative: user/login.html
Context-relative: /itemdetails?id=3 (context name in server will be added automatically)
Server-relative: ~/billing/processInvoice (allows calling URLs in another context (= application) in the same server.
Protocol-relative URLs: //code.jquery.com/jquery-2.0.3.min.js
 -->
 
<a href="#" th:href="@{https://cn.bing.com}">Absolute URLs</a><br />
<a href="#" th:href="@{templates/demo1.html}">Page-relative</a><br />
<a href="#" th:href="@{/demo1}">Context-relative</a><br />
<a href="#" th:href="@{~/xxx/demo1}">Server-relative</a><br />
<a href="#" th:href="@{//code.jquery.com/jquery-2.0.3.min.js}">Protocol-relative</a><br />
<hr />
<a href="#" th:href="@{/order(id=${employee.id}, action='show')}">demo1</a><br />
<a href="#" th:href="@{/order/{id}(id=${employee.id},action='show')}">demo2</a><br />
</body>
</html>